package com.b.domain;

import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
    * 投币记录表
    */
@Document(indexName = "coinrecord")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CoinRecord {
    /**
    * 投币记录ID
    */
    @Id
    private Integer id;

    /**
    * 投币用户ID
    */

    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer userId;

    /**
    * 视频ID
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer videoId;

    /**
    * 投币数
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer coinCount;

    /**
    * 投币时间
    */
    @Field(type = FieldType.Date, index = false , store = true)
    private Date createTime;
}